home *** CD-ROM | disk | FTP | other *** search
/ Treccani Italiana Di Scienze Lettere Ed Arti / [Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso / pc / data / xxi_appendice_dvd.swf / scripts / __Packages / CAppendiceTornaAButton.as < prev    next >
Text File  |  2007-11-08  |  2KB  |  47 lines

  1. class CAppendiceTornaAButton extends mx.core.UIObject
  2. {
  3.    function CAppendiceTornaAButton(inBaseUrl)
  4.    {
  5.       super();
  6.       this.doLater(this,"init");
  7.    }
  8.    function init()
  9.    {
  10.       this.mc_BtnTornaARicerca.addEventListener("click",mx.utils.Delegate.create(this,this.onClick));
  11.       this.mc_BtnTornaARicerca.setStyle("borderStyle","none");
  12.       this.mc_BtnTornaAProspettive.addEventListener("click",mx.utils.Delegate.create(this,this.onClick));
  13.       this.mc_BtnTornaAProspettive.setStyle("borderStyle","none");
  14.    }
  15.    function onClick(ev)
  16.    {
  17.       this.dispatchEvent({type:"click",target:ev.target,event:ev.event});
  18.    }
  19.    function SetState(inState)
  20.    {
  21.       if(inState.indexOf("back_") >= 0)
  22.       {
  23.          inState = inState.substring(5,inState.length);
  24.       }
  25.       if(inState == "history")
  26.       {
  27.          this._visible = false;
  28.       }
  29.       else
  30.       {
  31.          if(inState == "ricerca" || inState == "lemma")
  32.          {
  33.             this.mc_BtnTornaARicerca.setState(inState == "ricerca");
  34.             this.mc_BtnTornaAProspettive._visible = false;
  35.             this.mc_BtnTornaARicerca._visible = true;
  36.          }
  37.          else if(inState == "menuProspettive" || inState == "prospettiva")
  38.          {
  39.             this.mc_BtnTornaAProspettive.setState(inState == "menuProspettive");
  40.             this.mc_BtnTornaAProspettive._visible = true;
  41.             this.mc_BtnTornaARicerca._visible = false;
  42.          }
  43.          this._visible = true;
  44.       }
  45.    }
  46. }
  47.